﻿using System;
using ReAnimation.Domain;
using ReAnimation.Helpers.Common;
using ReAnimation.MVP.ModelInterfaces;
using ReAnimation.Helpers.WinForms;

namespace ReAnimation.MVP.Models
{
    public class MainPresentationModel: IMainPresentationModel
    {
        private bool _linkingMode;
        public bool LinkingMode
        {
            get
            {
                return _linkingMode;
            }
            set
            {
                if(_linkingMode == value) return;
                _linkingMode = value;
                LinkingModeChanged.Throw(this,new EventArg<bool>(_linkingMode));
            }
        }

        private Pair<Atom, Atom> _currentlySelectedForLinkingAtoms;
        public Pair<Atom, Atom> CurrentlySelectedForLinkingAtoms
        {
            get
            {
                return _currentlySelectedForLinkingAtoms;
            }
            set
            {
                _currentlySelectedForLinkingAtoms = value;
            }
        }

        public event EventHandler<EventArg<bool>> LinkingModeChanged;



        public MainPresentationModel()
        {
            _linkingMode = false;
        }
    }
}
